package com.example.demo.model.form;

import com.example.demo.model.core.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@Schema(description = "字典表单")
public class DictForm implements Serializable {
    @NotNull(message = "id不能为空", groups = {Update.class})
    @Schema(description = "字典ID")
    private Long id;
    @NotEmpty(message = "字典编码不能为空")
    @Schema(description = "字典编码")
    private String dictCode;
    @NotEmpty(message = "字典名称不能为空")
    @Schema(description = "字典名称")
    private String name;
    @Schema(description = "排序")
    private Integer ordernum;
}
